package com.xiaokan.model;

public class Configuration {

	public final static byte EMPTY = 0, WHITE = 1, BLACK = 2;
	public volatile int[][] config = new int[8][8];

	/**
	 * Initiate the checker board configuration
	 */
	public void init() {

		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 8; j++)
				if ((i + j) % 2 == 1) {
					config[i][j] = 1;
				} else
					config[i][j] = 0;
		for (int i = 0; i < 8; i++)
			config[4][i] = 0;
		for (int i = 5; i < 8; i++)
			for (int j = 0; j < 8; j++)
				if ((i + j) % 2 == 1) {
					config[i][j] = 2;
				} else
					config[i][j] = 0;
	}

	// public Configuration clone() {
	// Configuration ret = new Configuration();
	// for (int i = 0; i < 8; i++)
	// for (int j = 0; j < 8; j++) {
	// ret.config[i][j] = this.config[i][j];
	// }
	// return ret;
	// }

}
